package net.ericaro.neojavagen.blocks;

/**
 * <b>SynchronizedStatement</b> ::= "synchronized" "(" <{@link net .ericaro .neojavagen .expressions .Expression Expression}> ")" <
 * {@link net .ericaro .neojavagen .blocks .Block Block}>
 * 
 * @author eric@ericaro.net
 */
public class SynchronizedStatement extends net.ericaro.neojavagen.JavaPartComposition implements net.ericaro.neojavagen.blocks.StatementWithoutTrailingSubstatement {
	private net.ericaro.neojavagen.blocks.Block block;

	private net.ericaro.neojavagen.expressions.Expression expression;

	public SynchronizedStatement(net.ericaro.neojavagen.expressions.Expression expression, net.ericaro.neojavagen.blocks.Block block) {
		super();
		this.expression = expression;
		this.block = block;
	}

	public net.ericaro.neojavagen.blocks.Block getBlock() {
		return block;
	}

	public net.ericaro.neojavagen.expressions.Expression getExpression() {
		return expression;
	}

	public void setBlock(net.ericaro.neojavagen.blocks.Block block) {
		this.block = block;
	}

	public void setExpression(net.ericaro.neojavagen.expressions.Expression expression) {
		this.expression = expression;
	}

	@Override
	public java.lang.String toString() {
		return print("synchronized", "(", expression, ")", block);
	}
}
